# -*- coding: utf-8 -*- 
def print_title():
    print("-"*30)
    print(' '*9+'名片管理系统')
    print('1:添加名片')
    print('2:删除名片')
    print('3:修改名片')
    print('4:查询名片')
    print('5:显示所有名片')
    print('6:退出系统')
    print("-"*30)



card=[{'姓名':'zs'},{'姓名':'ls'}]
bussess_card={}
def add_card():
    bussess_card={}
    bussess_card['姓名']=str(input('请输入姓名'))
    bussess_card['手机号']=input('请输入手机')
    bussess_card['qq']=input('请输入qq')
    card.append(bussess_card)
    bussess_card={}
    print(bussess_card)
    print(card)


def del_card():
    card1=card
    card2=card1[::]

    print(card1)
    del_name=str(input('请输入要删除姓名'))

    for i,each in enumerate(card1):
        print(each)
        print(i)
        
        if each['姓名'] == del_name:
            card.remove(card[i])
            print('已经删除')
            print(card)
            break
    
    else:        
        print('对不起查无此人,无法修改')


def change_card():
    change_name=str(input('请输入要修改姓名'))
    for i,each in enumerate(card):
        if each['姓名']==change_name:
            card.remove(card[i])
            add_card()
            break
    else:        
        print('对不起查无此人')


def find_card():
    find_name=str(input('查找的姓名'))
    for i,each in enumerate(card):
        
        if each['姓名']==find_name:
            print(each)
            break
    
    else:
        print('对不起查无此人')


def all_card():
    for each in card:
        print(each)
        
    


# if __name__ == '__main__'